package cn.hl.hm.exception;

import cn.hl.hm.util.InfoCode;
/**
 * 自定义异常
 * 2016-12-29
 * @author 大和
 */
public class AppException extends RuntimeException {

	private static final long serialVersionUID = -4098481856735743548L;

	private InfoCode infoCode;

	public AppException(InfoCode infoCode) {
		this.infoCode = infoCode;
	}

	public AppException(InfoCode infoCode, String msg) {
		this.infoCode = infoCode;
		if (infoCode != null) {
			infoCode.setMsg(msg);
		}
	}

	public InfoCode getInfoCode() {
		return infoCode;
	}

}
